float4x4 matViewProjection : ViewProjection;
struct VS_INPUT 
{
   float4 Position : POSITION0;
   float2 Texcoord : TEXCOORD0;
};
struct VS_OUTPUT 
{
   float4 Position : POSITION0;
   float2 Texcoord : TEXCOORD0;
};
VS_OUTPUT Vertex_Shader_vs_main( VS_INPUT Input )
{
   VS_OUTPUT Output;
   Output.Position = mul( Input.Position, matViewProjection );
   Output.Texcoord = Input.Texcoord;
   return( Output );
}

uniform extern texture base_Tex;
sampler2D baseMap = sampler_state
{
   Texture = <base_Tex>;
};
struct PS_INPUT 
{
   float2 Texcoord : TEXCOORD0;
};
float radius;
float positions_x[81];
float positions_y[81];
float durchmesser;

float4 Pixel_Shader_ps_main( PS_INPUT Input ) : COLOR0
{
   float4 ret_value = float4(0.0f, 0.0f, 0.0f, 0.0f);
   float durchmesser = (radius * 2.0f) + 1.0f;
   float r = fmod((durchmesser+(frac(sin(dot(Input.Texcoord.xy ,float2(12.9898,78.233))) * 43758.5453))*durchmesser),81);
   ret_value = tex2D(baseMap, float2(Input.Texcoord.x + positions_x[r], Input.Texcoord.y + positions_y[r]));
   return ret_value;
}
technique Textured
{
   pass Pass_0
   {
	  VertexShader = compile vs_3_0 Vertex_Shader_vs_main();
      PixelShader = compile ps_3_0 Pixel_Shader_ps_main();
   }
}